﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace KentekenHerkenning
{
    class Result
    {
        public string filePath;
        public string originalPath;
        public int Time;
        public string foundLicensePlate;
        public string supposedLicencePLate;
        public Point TopLeft, SupposedTopLeft;
        public Point TopRight, SupposedTopRight;
        public Point BottomLeft, SupposedBottomLeft;
        public Point BottomRight, SupposedBottomRight;
        public int CorrectPercentage;
        public int matchingCharacters;
        public int LicencePLateDifference;

        public int CalcDifference()
        {
            int i = 0;
            i += Math.Abs(TopLeft.X - SupposedTopLeft.X);
            i += Math.Abs(TopLeft.Y - SupposedTopLeft.Y);
            i += Math.Abs(BottomLeft.X - SupposedBottomLeft.X);
            i += Math.Abs(BottomLeft.Y - SupposedBottomLeft.Y);
            i += Math.Abs(TopRight.X - SupposedTopRight.X);
            i += Math.Abs(TopRight.Y - SupposedTopRight.Y);
            i += Math.Abs(BottomRight.X - SupposedBottomRight.X);
            i += Math.Abs(BottomRight.Y - SupposedBottomRight.Y);
            return i/8;
        }
    }
}
